#pragma once
#include "afxwin.h"


// CDlgTrader dialog

class CDlgTrader : public CDialog
{
	DECLARE_DYNAMIC(CDlgTrader)

public:
	CDlgTrader(CWnd* pParent = NULL);   // standard constructor
	virtual ~CDlgTrader();

// Dialog Data
	enum { IDD = IDD_DLG_TRADER };

protected:
	virtual void		DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	CString				m_strTraderID;
	CString				m_strTraderName;
	CString				m_strTraderPwd;
	CComboBox			m_comboAutoLogon;
	CComboBox			m_comboTradeLineID;
	BOOL				m_bIsModifyData;
	BOOL				m_bDlgReadOnly;
	BOOL				m_bExitIfExisted;
	ITraderKeyEx        m_traderKeyEx;
	ITraderEx           m_trader;
	virtual BOOL		OnInitDialog();
	afx_msg void		OnBnClickedOk();
	afx_msg void		OnBnClickedCancel();
	void				InitUIStyle();
	void				DisplayTraderInfo();
	CString				GetTradeLineName(CString strTradeLineID);
	CString				GetServiceType(IServiceType serviceType);
	void				SetTraderKeyEx(ITraderKeyEx traderKeyEx);
	void				SetDlgReadOnly(){m_bDlgReadOnly = TRUE;};
	void				ExitIfExisted(){m_bExitIfExisted = TRUE;};
	ITraderEx			GetTraderEx(){return m_trader;};
};
